<?php include(TEMPLATE_DIR . 'header.tpl'); ?>
	<script type="text/javascript" src="report/scripts/js/pstat.js"></script>
	<div class="main">
		<div class="push_stat_title">
			<h4>Push 详细信息<span class="close_img"><a href="#" class="close">Close</a></span></h4>
			<div class="line"></div>
		</div>
		<div class="push_detail_box">
			<table class="push_detail_table" border="0" width="100%">
			<tr>
				<th>列</th>
				<th>值</th>
			</tr>
			<tr>
				<td class="column">ID</td>
				<td><?php echo $this->format($row['id']); ?></td>
			</tr>
			<tr>
				<td class="column">产品ID</td>
				<td><?php echo $this->format($row['prod']); ?></td>
			</tr>
			<tr>
				<td class="column">Token</td>
				<td><?php echo $this->format($row['token']); ?></td>
			</tr>
			<tr>
				<td class="column">内容</td>
				<td><?php echo $this->format($row['content']); ?></td>
			</tr>
			<tr>
				<td class="column">应用自定义ID</td>
				<td><?php echo $this->format($row['mid']); ?></td>
			</tr>
			<tr>
				<td class="column">badge</td>
				<td><?php echo $this->format($row['badge']); ?></td>
			</tr>
			<tr>
				<td class="column">sound</td>
				<td><?php echo $this->format($row['sound']); ?></td>
			</tr>
			<tr>
				<td class="column">image</td>
				<td><?php echo $this->format($row['image']); ?></td>
			</tr>
			<tr>
				<td class="column">过期时间</td>
				<td><?php echo $this->format($row['expire']); ?></td>
			</tr>
			<tr>
				<td class="column">标题</td>
				<td><?php echo $this->format($row['title']); ?></td>
			</tr>
			<tr>
				<td class="column">custom</td>
				<td><?php echo $this->format($row['custom']); ?></td>
			</tr>
			<tr>
				<td class="column">接收时间</td>
				<td><?php echo $this->format($row['tmr'], 'STD_DATETIME'); ?></td>
			</tr>
			<tr>
				<td class="column">发送时间</td>
				<td><?php echo $this->format(($this->getSendResult($row['tms']) !== 0 ? abs($row['tms']) : null), 'STD_DATETIME'); ?></td>
			</tr>
			<tr>
				<td class="column">花费时间</td>
				<td>
					<?php if ($this->getSendResult($row['tms']) !== 0) : ?>
						<?php $spendTime = (abs($row['tms']) - $row['tmr']); ?>
						<span class="second" title="<?php echo $this->format($spendTime, 'STD_FLOAT_TIME_FULL'); ?>">
							<?php echo $this->format($spendTime, 'STD_FLOAT_TIME'); ?>
						</span>
					<?php else: ?>
						<?php echo $this->format(null); ?>
					<?php endif; ?>
				</td>
			</tr>
			<tr>
				<td class="column">发送结果</td>
				<td>
					<?php $resultText = $this->getSendResult($row['tms'], true); ?>
					<span><?php echo $resultText; ?>
						<?php if ($this->getSendResult($row['tms']) < 0): ?>
							 | <span id="error_msg"><?php echo htmlspecialchars($row['errmsg']); ?></span>
							<!--
								<span style="cursor:pointer;color:red;font-weight:bold;" title="显示原因" onclick="$('#error_msg').toggle()">!</span>
							-->
						<?php endif; ?>
					</span>
					<!--
					<span id="error_msg"><?php echo htmlspecialchars($row['errmsg']); ?></span>
					-->
				</td>
			</tr>
			<tr>
				<td class="column">主机</td>
				<td>
					<?php echo $this->format(($this->getSendResult($row['tms']) !== 0 ? $row['hoststr'] : null), 'NULL_TEXT'); ?>
				</td>
			</tr>
		</table>
		</div>
	</div>
	<script type="text/javascript">
		$(function(){
			pstat.loadForm();

			//$("#error_msg").hide();
		});
	</script>
<?php include(TEMPLATE_DIR . 'footer.tpl'); ?>